cmdline_parse(cmdline);
/* Must do this early -- e.g., spinlocks rely on get_current(). */
- set_current(&idle0_task);
+ set_current(&idle0_exec_domain);
/* We initialise the serial devices very early so we can get debugging. */
serial_init_stage1();
if ( dom0 == NULL )
panic("Error creating domain 0\n");
- set_bit(DF_PRIVILEGED, &dom0->flags);
+ set_bit(DF_PRIVILEGED, &dom0->d_flags);
/* Grab the DOM0 command line. Skip past the image name. */
cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL);
/* Give up the VGA console if DOM0 is configured to grab it. */
console_endboot(cmdline && strstr(cmdline, "tty0"));
- domain_unpause_by_systemcontroller(current);
+ domain_unpause_by_systemcontroller(current->domain);
domain_unpause_by_systemcontroller(dom0);
startup_cpu_idle_loop();
}
struct domain *domain_list;
xmem_cache_t *domain_struct_cachep;
+xmem_cache_t *exec_domain_struct_cachep;
struct domain *dom0;
void __init domain_startofday(void)
"domain_cache", sizeof(struct domain),
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
if ( domain_struct_cachep == NULL )
- panic("No slab cache for domain structs.");
+ BUG();
+
+ exec_domain_struct_cachep = xmem_cache_create(
+ "exec_dom_cache", sizeof(struct exec_domain),
+ 0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+ if ( exec_domain_struct_cachep == NULL )
+ BUG();
}
struct domain *do_createdomain(domid_t dom_id, unsigned int cpu)
return rc;
}
-extern xmem_cache_t *exec_domain_struct_cachep;
-
/*
* final_setup_guestos is used for final setup and launching of domains other
* than domain 0. ie. the domains that are being built by the userspace dom0